// reducer文件
import { JIA } from "./constant";
function countReducer(previousState = 0, action) {
  console.log("countReducer执行了", previousState, action);
  const { type, data } = action;
  switch (type) {
    case JIA:
      return previousState + data;
    case "asyncJia":
      return previousState + data;

    default:
      // 初始化状态
      return previousState;
  }
}
export default countReducer;
